#ifndef _TIMEINTERVAL_JY_H_
#define _TIMEINTERVAL_JY_H_

/**
 * @file timeInterval_JY.h
 * @author Joshua Yang
 * @brief Header file for time interval and sleep functions
 *
 * This header file contains the declarations for time interval calculations
 * and platform-specific sleep functions.
 */

#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus

// sleep
#if defined(__linux__) || defined(__unix__)
#include <unistd.h>
#define sleep_JY(x) usleep(x * 1000)
#elif _WIN32
#include <windows.h>
#define sleep_JY(x) Sleep(x)
#endif

// interval Time
#if defined(__linux__) || defined(__unix__)
#include <sys/time.h>
#elif _WIN32
#include <windows.h>
#endif

    double countTimeInterval_JY();

#ifdef __cplusplus
}
#endif // __cplusplus
#endif